package com.maiji.cloud.service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.google.common.collect.Maps;
import com.maiji.cloud.config.MyRedisConfig;
import com.maiji.cloud.entities.community.ComComment;
import com.maiji.cloud.entities.community.ComMiddleUserMessage;
import com.maiji.cloud.entities.community.ComMsgInfo;
import com.maiji.cloud.entities.community.ComUserMessage;
import com.baomidou.mybatisplus.service.IService;
import com.maiji.cloud.entities.login.AppUser;
import com.maiji.cloud.entities.login.UserInfo;
import com.maiji.cloud.request.BaseInputDto;
import com.maiji.cloud.request.community.ComUserMessageInputDto;
import com.maiji.cloud.request.community.ComUserMessageQueryInputDto;
import com.maiji.cloud.response.BaseOutPutDto;
import com.maiji.cloud.response.Status;
import com.maiji.cloud.response.community.ComCommentOutputDto;
import com.maiji.cloud.response.community.ComMsgBaseOutputDto;
import com.maiji.cloud.response.community.ComUserMessageOutputDto;
import com.maiji.cloud.response.community.ComUserMsgCountOutPutDto;
import com.maiji.cloud.response.login.UserInfoResData;
import com.maiji.cloud.utils.BaseService;
import com.maiji.cloud.utils.ComUserMessageTypeEnum;
import com.maiji.cloud.utils.RedisUtil;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ${author}
 * @since 2019-10-12
 */
public interface ComUserMessageService extends IService<ComMiddleUserMessage>{

    /**
     * 社区消息数量
     * @param inputDto
     * @param maijiToken
     * @return
     */
    public BaseOutPutDto<ComUserMsgCountOutPutDto> messageCount(@RequestBody BaseInputDto inputDto, @RequestHeader("maijiToken")String maijiToken);

    /**
     * 创建一条社区消息
     * @param inputDto
     * @return
     */
    public BaseOutPutDto createMessages(ComUserMessageInputDto inputDto);

    /**
     * 批量创建社区消息
     * @param inputDto
     * @return
     */

    public BaseOutPutDto createMessagesList(List<ComUserMessageInputDto> inputDto);

    /**
     * 社区消息通用列表查询接口
     * @param inputDto
     * @param maijiToken
     * @return
     */
    public BaseOutPutDto<List<ComUserMessageOutputDto>> comCommonMessages(@RequestBody BaseInputDto<ComUserMessageQueryInputDto> inputDto, @RequestHeader("maijiToken")String maijiToken);


    /**
     * 评论相关消息
     * @param inputDto
     * @param maijiToken
     * @return
     */
    public BaseOutPutDto<List<ComUserMessageOutputDto>> commentMessages(@RequestBody BaseInputDto inputDto, @RequestHeader("maijiToken")String maijiToken);



    /**
     * 回复消息
     * @param inputDto
     * @param maijiToken
     * @return
     */
    public BaseOutPutDto<List<ComUserMessageOutputDto>> replyMessages(@RequestBody BaseInputDto inputDto, @RequestHeader("maijiToken")String maijiToken);

    /**
     * 点赞消息
     * @param inputDto
     * @param maijiToken
     * @return
     */

    public BaseOutPutDto<List<ComUserMessageOutputDto>> praiseMessages(@RequestBody BaseInputDto inputDto, @RequestHeader("maijiToken")String maijiToken);

    /**
     * 被关注消息
     * @param inputDto
     * @param maijiToken
     * @return
     */
    public BaseOutPutDto<List<ComUserMessageOutputDto>> followMessages(@RequestBody BaseInputDto inputDto, @RequestHeader("maijiToken")String maijiToken);

    /**
     * 被@消息
     * @param inputDto
     * @param maijiToken
     * @return
     */
    public BaseOutPutDto<List<ComUserMessageOutputDto>> atMessages(@RequestBody BaseInputDto inputDto, @RequestHeader("maijiToken")String maijiToken);


}
